"use client";

import dynamic from "next/dynamic";

// 使用客户端渲染组件以避免SSR警告
const HomePage = () => {
  return (
    <div className="flex items-center justify-center min-h-screen bg-gray-100">
      <div className="text-center max-w-md mx-auto p-8">
        <h1 className="text-3xl font-bold text-gray-800 mb-4">支付系统导航</h1>
        <p className="text-gray-600 mb-8">请选择您要访问的功能</p>
        
        <div className="space-y-4">
          <a 
            href="/wxpub" 
            className="block w-full bg-blue-500 hover:bg-blue-600 text-white font-semibold py-3 px-6 rounded-lg transition-colors"
          >
            微信授权登录
          </a>
          
          <a 
            href="/pay" 
            className="block w-full bg-green-500 hover:bg-green-600 text-white font-semibold py-3 px-6 rounded-lg transition-colors"
          >
            充值支付
          </a>
          
          <a 
            href="/hotel" 
            className="block w-full bg-purple-500 hover:bg-purple-600 text-white font-semibold py-3 px-6 rounded-lg transition-colors"
          >
            酒店预订
          </a>
          
          <a 
            href="/login" 
            className="block w-full bg-gray-500 hover:bg-gray-600 text-white font-semibold py-3 px-6 rounded-lg transition-colors"
          >
            手机登录
          </a>
        </div>
      </div>
    </div>
  );
};

// 导出为客户端组件，避免SSR
export default dynamic(() => Promise.resolve(HomePage), { ssr: false });
